<template>
<div class="container">
  <text class="big-title">示例</text>
  <slider class="slider" auto-play="true" interval="3000">
    <div class="frame" v-for="img in imgList">
      <image class="image" resize="cover" :src="img.src"></image>
    </div>
  </slider>
  <text class="big-title">文档</text>
  <div class="button" @click="showDoc"><text class="btn-text">点击查看文档</text></div>
</div>
</template>

<style scoped>
.container {
  padding: 10px;
}
.big-title {
  color: black;
  font-size: 50px;
  font-weight: bold;
  margin-bottom: 20px;
  margin-top: 20px;
}
.image {
  width: 600px;
  height: 600px;
}
.slider {
  margin-top: 25px;
  margin-left: 65px;
  width: 600px;
  height: 600px;
  border-width: 2px;
  border-style: solid;
  border-color: black;
  margin-bottom: 20px;
}
.frame {
  width: 600px;
  height: 600px;
  position: relative;
}
.button {
  height: 60px;
  justify-content: center;
  opacity: 1.0;
}
.button:active {
  opacity: 0.6;
}
.btn-text {
  font-size: 30px;
  color: blue;
}
</style>

<script>
import utils from '../utils.js';
let navigator = weex.requireModule('navigator');
export default {
  data: {
    imgList: [
      {src: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'},
      {src: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'},
      {src: 'https://gd3.alicdn.com/bao/uploaded/i3/TB1x6hYLXXXXXazXVXXXXXXXXXX_!!0-item_pic.jpg'}
    ]
  },
  methods: {
    showDoc() {
      navigator.push({
        url: utils.getDocDetailUrl(weex.config.bundleUrl),
        animated: true
      });
    }
  }
}
</script>
